﻿using System;
using System.Collections.Generic;
using System.Text;
using NLBS.Entity;
using NLBS.Framework;

namespace NLBS.Data.Business
{
   public class TagData
    {
        private static readonly string TagKey = "TagKey";
        public static ITagCollection<string,Tag> GetTag()
        {
            ContentCache cache = ContentCache.Instantiate();
            ITagCollection<string, Tag> lists = (TagCollection<string, Tag>)cache[TagKey];
            if (lists == null)
            {
                lists = DbProvider.Instance().GetTags();
                if (lists != null)
                {
                    cache.Insert(TagKey, lists, CacheDuration.Long);
                }
            }
            return lists;
        }
    }
}
